import React from 'react'
import AppLayout from './components/AppLayout'
import './App.less'
import { BrowserRouter, Route, Switch } from 'react-router-dom'
import Login from './pages/Login'
import Register from './pages/Register'

import Npe from './pages/Npe'

// 设置为暗黑主题
// document.body.setAttribute('arco-theme', 'dark')
// 恢复亮色主题
// document.body.removeAttribute('arco-theme')

function App() {
  return (
    <>
      <BrowserRouter>
        <Switch>
          <Route key={'/npe'} path={'/npe'} component={Npe} />
          <Route key={'/login'} exact={true} path={'/login'} component={Login} />
          <Route key={'/register'} exact={true} path={'/register'} component={Register} />
          <Route key={'/'} path={'/'} component={AppLayout} />
        </Switch>
      </BrowserRouter>
    </>
  )
}

export default App
